<?php 
	$ketquatimkiems = $viewModel->get('ketquatimkiems'); 
	// var_dump($ketquatimkiems);die;
	$keyword = $viewModel->get('keyword'); 
 ?>
<section class="main_content">
		<div class="container">
		<div class="row row_search">
				<h1>Kết quả tìm kiếm</h1>
				<ul>
					<?php if($ketquatimkiems) {?>
						<?php foreach ($ketquatimkiems as $diadiemdulich) { ?>         							                          
			              <li class="media bt-top">
			                <a class="pull-left" href="<?php echo BASE_URL.'diadiemdulich/place/'.$diadiemdulich->Alias ?>">
			                  <img src="<?php echo PATH_IMAGE_PLACE.$diadiemdulich->HinhAnh; ?>" height="100px" width="100px" alt="tên dự án" class="img-responsive news-img img-thumbnail">
			                </a>
			                <div class="media-body">
			                <a href="<?php echo BASE_URL.'diadiemdulich/place/'.$diadiemdulich->Alias ?>">
			                  <h2 class="media-heading"><?php echo $diadiemdulich->TenDiem; ?></h2>
			                 </a>
			                  <p>
			                  	<?php 			                  	
									if (strlen($diadiemdulich->MoTa)<300)
									{
										echo $diadiemdulich->MoTa;
									}
									else
									{
										echo substr($diadiemdulich->MoTa, 0, 300).'...';
									}
									if (empty($diadiemdulich->MoTa))
										{
											echo 'Chưa có mô tả';
										}
								?>			                  	
			                  </p>
			                </div>
			              </li>
			              <hr>
			             <?php } ?>
	              <?php }  else { ?>
              		<p>Không tìm thấy địa điểm nào với từ khóa <b><?php echo $keyword ?></b></p>
              <?php } ?>
            </ul>
		</div>
	</div>
</section>